package com.qf.medical.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qf.medical.mapper.HospitalizationMapper;
import com.qf.medical.service.HospitalizationService;
import com.qf.medical.vo.PageBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @EXPLAIN:
 * @author: 苑天恒
 * @DATE: 2023/5/7 0007
 * @Email: 3483282099@qq.com
 */
@Service
public class HospitalizationServiceImpl implements HospitalizationService {
    @Autowired
    private HospitalizationMapper hospitalizationMapper;

    @Override
    public PageBean selectHospitalizationList(Integer zyid, int page, int limit) {
        PageHelper.startPage(page, limit);
        PageInfo info = new PageInfo(hospitalizationMapper.selectHospitalizationList(zyid));
        return PageBean.bean(info.getTotal(), info.getList());
    }
}
